//package org.karelun.rabbit.rcp.command;
//
//import org.eclipse.draw2d.geometry.Dimension;
//import org.eclipse.draw2d.geometry.Point;
//import org.eclipse.gef.commands.Command;
//import org.karelun.rabbit.graph.Diagram;
//import org.karelun.rabbit.graph.Shape;
//import org.karelun.rabbit.rcp.utils.ModelUtils;
//
//public class CreateShapeCommand extends Command{
//	
//	private Diagram diagram;
//	
//	private Shape newShape;
//	
//	private Point location;
//	
//	private Dimension size;
//	
//	public CreateShapeCommand(Diagram diagram, Shape newShape) {
//		this.diagram=diagram;
//		this.newShape=newShape;
//	}
//
//	public void setLocation(Point location) {
//		this.location=location;
//	}
//	
//	@Override
//	public void execute() {
//		ModelUtils.setShapeLocation(newShape, location);
//		ModelUtils.setShapeSize(newShape, size);
//		diagram.getShapes().add(newShape);
//	}
//	
//	@Override
//	public void undo() {
//		diagram.getShapes().remove(newShape);
//	}
//
//	public void setSize(Dimension size) {
//		this.size=size;
//	}
//}